package com.epoch.servicetest.dao;

import com.epoch.servicetest.test.Question;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 *
 * @author Seven
 * @date 2021/12/13
 */
@Repository
@Mapper
public interface QuestionDao {
    /**
     * 根据testId获取question
     * @param testId
     * @return
     */
    List<Question> getQuestionByTestId(@Param("testId") Integer testId);

//    /**
//     * 获取question的最大id
//     * @return
//     */
//    int getMaxQuestionId();

    /**
     * 根据questionId获取question
     * @param questionId
     * @return
     */
    Question getQuestionByQuestionId(@Param("questionId") Integer questionId);
}
